$primary:    #13ae2f;
$secondary:  #f8c13b;
$danger:     #d81e06;
$blue:       #1070ff;
$light:      #eee;
$dark:       #333;

$bodyWidth:500px;


@function px2rem($px, $base-font-size: 75px) {
  @return ($px / $base-font-size) * 1rem;
}

// 背景图片地址和大小
@mixin bg($url) {
	background-image: url($url);
	background-repeat: no-repeat;
	background-size: 100% 100%;
}

@mixin borderRadius($radius:4px) {
    -webkit-border-radius: $radius;
    -moz-border-radius: $radius;
    -ms-border-radius: $radius;
    -o-border-radius: $radius;
    border-radius: $radius;
}
//定位全屏
@mixin allcover{
	position:absolute;
	top:0;
	right:0;
}

//定位上下左右居中
@mixin center {
	position: absolute;
	top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}


//定位上下居中
@mixin ct {
	position: absolute;
	top: 50%;
  transform: translateY(-50%);
}

//定位上下居中
@mixin cl {
	position: absolute;
	left: 50%;
  transform: translateX(-50%);
}

//宽高
@mixin wh($width, $height){
	width: $width;
	height: $height;
}

//字体大小，颜色
@mixin sc($size, $color){
	font-size: $size;
	color: $color;
}

//flex 布局和 子元素 对其方式
@mixin fj($type: space-between){
  display: -webkit-flex;
  display: -webkit-box;
  display: flex;
  -webkit-justify-content: $type;
	justify-content: $type;
}
//全宽底部线条
@mixin bb($color:$light) {
  position: relative;
  &:after{
    content: '';
    display: block;
    position: absolute;
    left:0;
    bottom:0;
    width: 100%;
    height: 1px;
    background-color: $color;
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
  }
}
@mixin bt($color:$light) {
  position: relative;
  &:before{
    content: '';
    display: block;
    position: absolute;
    left:0;
    top:0;
    z-index:2;
    width: 100%;
    height: 1px;
    background-color: $color;
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
  }
}
@mixin f1{
  -webkit-flex: 1;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}
